package com.cuixk.microservice.consul.controller;

import com.cuixk.microservice.consul.pojo.User;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/user")
public class UserController {

    @GetMapping("/{id}")
    public User getUserInfo(@PathVariable Integer id) {
        User user = new User();
        user.setId(id);
        user.setName("provider");
        user.setAge(25);
        return user;
    }
}
